package com.reyco1.medusa.display.control
{
	import com.reyco1.medusa.display.SmartSprite;
	
	public class BaseControl extends SmartSprite
	{
		protected   var _height:Number = 0;
		protected var _width:Number  = 0;
		
		public function BaseControl()
		{
			super();
		}
		
		public function invalidate():void
		{
			startRender();
		}
		
		protected function build():void
		{
			
		}
		
		override protected function onRender():void
		{
			stopRender();
			build();
		}

		override public function get width():Number
		{
			return _width;
		}

		override public function set width(value:Number):void
		{
			_width = value;
			invalidate();
		}

		override public function get height():Number
		{
			return _height;
		}

		override public function set height(value:Number):void
		{
			_height = value;
			invalidate();
		}


	}
}